<?php Yii::app()->clientScript->registerCssFile(Yii::app()->url->theme.'css/popup.css'); ?>
<?php $this->beginWidget('zii.widgets.jui.CJuiDialog', array(
    'cssFile'=>false,
    'id'=>'admin-login-form',
    'options'=>array(
        'title'=>Yii::t('main','login'),
        'autoOpen'=>true,
        'modal'=>true,
        'resizable'=>false,
    ),
)); ?>

    <?php $model=Yii::app()->user->model; ?>

    <?php $form=$this->beginWidget('CActiveForm', array(
        'id'=>'login-form',
        'action'=>Yii::app()->createUrl('admin/account/login'),
        'method'=>'post',
        'enableAjaxValidation'=>true,
        'clientOptions'=>array(
            'validateOnSubmit'=>true,
            'validateOnChange'=>false,
        ),
    )); ?>

        <?php echo CHtml::errorSummary(array($model)); ?>

        <div class="form-line">
            <?php echo $form->textField($model,'login',array(
                'placeholder'=>$model->getAttributeLabel('login'),
                'class'=>'loginput',
            )) ?>
            <?php echo $form->error($model,'login'); ?>
        </div>

        <div class="form-line">
            <?php echo $form->passwordField($model,'password',array(
                'placeholder'=>$model->getAttributeLabel('password'),
                'class'=>'loginput',
            )) ?>
            <?php echo $form->error($model,'password'); ?>
        </div>

        <div class="passrem form-line">
            <?php echo $form->checkbox($model,'remember'); ?>
            <?php echo $model->getAttributeLabel('remember'); ?>
        </div>

        <div class="form-line">
            <?php echo CHtml::link(Yii::t('main','login'),'#',array(
                'class'=>'btnenter',
                'onclick'=>'$("#login-form").submit(); return false;',
            )); ?>
        </div>

    <?php $this->endWidget(); ?>

<?php $this->endWidget('zii.widgets.jui.CJuiDialog'); ?>

